﻿using K9Nano.Reporting;

namespace K9Nano.Application.Reporting;

public interface IReportAppService
{
    Task DeleteAsync(int id, CancellationToken cancellation);
    Task<Report?> GetAsync(int id, CancellationToken cancellation);
    Task<ReportForm?> GetReportFormAsync(int id, CancellationToken cancellation);
    Task<IEnumerable<ReportSummary>> GetReportSummariesAsync(CancellationToken cancellation);
    Task<ReportResult> QueryAsync(ReportQueryDto dto, CancellationToken cancellation);
    Task SaveAsync(Report report, CancellationToken cancellation);
    Task<bool> SetStatusAsync(int id, bool isEnabled, CancellationToken cancellation);

    /// <summary>
    /// 导出报表数据
    /// </summary>
    /// <param name="dto">报表参数</param>
    /// <returns>获取报表数据的文件ID</returns>
    Task<string> ExportAsync(ReportExportDto dto, CancellationToken cancellation);
}
